package top.jiangqiang.qyblog.core.service;

import org.h2.tools.Recover;

import java.sql.SQLException;

/**
 * @author Jiangqiang
 * @version 1.0
 * @date 2022/12/9 18:03
 */
public class BackupAndRecover {
    public static void main(String[] args) throws SQLException {
//        String zipFileName = "./qy-blog-server/src/test/resources/db/" + DateUtil.format(new Date(), DatePattern.PURE_DATE_PATTERN) + "h2.zip";
        //备份为文件
//        Backup.execute(zipFileName, "./db", "qy-cloud", false);
        //备份为sql
        Recover.execute("./db", "qy-cloud");
//        Restore.execute(zipFileName, "./db", "qy-cloud");
    }
}
